package com.example.vue20220402.dao;

import com.example.vue20220402.pojo.Power;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author rock
 * @since 2022-04-11
 */
public interface PowerMapper extends BaseMapper<Power> {

    @Select(" select p.power_id from role r left join rolepower rp on r.role_id = rp.role_id " +
            " left join power p on p.power_id = rp.power_id " +
            " where r.role_id = #{roleId} and p.power_index = #{powerIndex}")
    List<Integer> checklevellist(Power power);
}
